/* 全局样式 */
:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --dark-color: #212529;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    padding-top: 56px; /* 导航栏高度 */
}

/* 视频卡片 */
.video-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.video-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f9fa;
}

.thumb-container {
    position: relative;
    padding-top: 140%; /* 16:9 比例 */
}

.thumb-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumb:hover .play-overlay {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.video-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.video-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.video-title a:hover {
    color: var(--primary-color);
}

.video-meta {
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
    
    .video-title {
        font-size: 13px;
    }
}

/* 浮动广告区域 */
.float-sidebar {
    position: fixed;
    z-index: 9999;
    top: 50%;
    transform: translateY(-50%);
}

.float-sidebar.left {
    left: 10px;
}

.float-sidebar.right {
    right: 10px;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#backToTop:hover {
    opacity: 1;
}

/* 加载动画 */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}